package com.supinfo.sun.sungamers.comparators;

import java.util.Comparator;

import com.supinfo.sun.sungamers.person.Person;

/**
 * @author Liu, Bing(Locke)
 * @since 2011-04-05
 * @version 0.3
 */
public class PersonComparator implements Comparator<Person> {

	public int compare(Person p1, Person p2) {
		if(p1.getBrithDate().after(p2.getBrithDate()))
			return 1;
		else if(p1.getBrithDate().equals(p2.getBrithDate()))
			return 0;
		else 
			return -1;
	}

}
